﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SLHello
{
    public partial class MainPage : UserControl
    {
        #region data
        private int _buttonCount = 1;
        #endregion

        #region constructor
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPage"/> class.
        /// </summary>
        public MainPage()
        {
            InitializeComponent();
        }
        #endregion

        #region methods
        /// <summary>
        /// Handles the Click event of the MyButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> 
        /// instance containing the event data.</param>
        private void MyButton_Click(object sender, RoutedEventArgs e)
        {
            MyMessage.Text = "You pressed the button " + _buttonCount.ToString() + " times";
            _buttonCount++;
        }
        #endregion
    }
}
